package com.cmict.data.system.service.websocket.listener;

import com.cmict.data.common.websocket.distribute.MessageDistributor;
import lombok.RequiredArgsConstructor;

@RequiredArgsConstructor
public class SystemWebsocketEventListener {

	private final MessageDistributor messageDistributor;

//	/**
//	 * 字典修改事件监听
//	 * @param event the `DictChangeEvent`
//	 */
//	@Async
//	@EventListener(DictChangeEvent.class)
//	public void onDictChangeEvent(DictChangeEvent event) {
//		// 构建字典修改的消息体
//		DictChangeMessage dictChangeMessage = new DictChangeMessage();
//		dictChangeMessage.setDictCode(event.getDictCode());
//		String msg = JsonUtils.toJson(dictChangeMessage);
//
//		// 广播修改信息
//		MessageDO messageDO = new MessageDO().setMessageText(msg).setNeedBroadcast(true);
//		messageDistributor.distribute(messageDO);
//	}

}
